package com.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@RabbitListener(queues = "queue_2020_2_1")
public class MQListenService {

    @RabbitHandler
    public void handlerMessage(String msg)
    {
        System.out.println("队列1收到消息:"+msg);
    }

}
